/*
 * @Author: benchenchuang benchenchuang
 * @Date: 2023-07-11 20:33:46
 * @LastEditors: benchenchuang benchenchuang
 * @LastEditTime: 2023-10-21 12:32:44
 * @FilePath: /hmp-web/src/views/staff/group/components/rules.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export const rules = {
    imageUrl: [
        { required: true, message: '请上传头像', trigger: 'change' }
    ],
    name: [
        { required: true, message: '请输入姓名', trigger: 'blur' },
        { min: 2, max: 20, message: '姓名长度2-20位', trigger: 'blur' },
        {
            pattern: new RegExp(/^((?!\+|\.|\\|\/|:|\*|\?|\!|<|>|\||'|%|@|#|&|\$|\^|&|\*).){1,50}$/),
            message: '名称不允许包含特殊字符',
            trigger: 'blur'
        }
    ],
    loginName: [
        { required: true, message: '请输入登录名', trigger: 'blur' },
        { min: 2, max: 20, message: '登录名长度2-20位', trigger: 'blur' },
    ],
    telephone: [
        { required: true, message: '请输入手机号', trigger: 'blur' },
        { pattern: /^1[3|4|5|7|8][0-9]\d{8}$/, message: '请输入正确的手机号' }
    ],
    email: [
        { required: true, message: '请输入邮箱', trigger: 'blur' },
        { pattern: /(^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$)/, message: '请输入正确的邮箱' }
    ],
    roleId: [
        { required: true, message: '请选择用户角色', trigger: 'change' },
    ],
    name: [
        { required: true, message: '请输入姓名', trigger: 'blur' },
        { min: 2, max: 20, message: '姓名长度2-20位', trigger: 'blur' },
    ],
    sex: [
        { required: true, message: '请选择性别', trigger: 'change' }
    ],
    age: [
        { required: true, message: '请输入年龄', trigger: 'blur' },
    ],
    insureStatus: [{ required: true, message: '请选择投保', trigger: 'change' }],
    post: [
        { required: true, message: '请输入岗位名称', trigger: 'blur' },
    ],
    manager: [
        { required: true, message: '请输入主管姓名', trigger: 'blur' },
    ],
    deptId: [
        {
            required: true,
            message: '请选择所属组织',
            trigger: 'change',
        },
    ],
    entryTime: [
        {
            required: true,
            message: '请选择入职时间',
            trigger: 'change',
        },
    ],
    status: [
        {
            required: true,
            message: '请选择状态',
            trigger: 'change',
        },
    ],
    
}